package com.dlc.beijingrfid.net.protocol;

import com.dlc.beijingrfid.net.protocol.base.HttpProtocol;

/**
 * 用来上传/下载文件
 */
public class FileProto extends HttpProtocol {

    private FileProto() {
    }

    private static class InstanceHolder {
        private static FileProto sProtocol = new FileProto();
    }

    public static FileProto get() {
        return InstanceHolder.sProtocol;
    }

    ///**
    // * 上传文件
    // *
    // * @param file
    // * @param error
    // * @return
    // */
    //public Observable<UploadFileBean> upload(File file, String error) {
    //
    //    HttpParams httpParams = new HttpParams();
    //    httpParams.put("file", file);
    //    return rxPost("upload_file", httpParams, UploadFileBean.class, error);
    //}
    //
    ///**
    // * 上传文件
    // *
    // * @param path
    // * @param error
    // * @return
    // */
    //public Observable<UploadFileBean> upload(String path, String error) {
    //    File file = new File(path);
    //    HttpParams httpParams = new HttpParams();
    //    httpParams.put("file", file);
    //    return rxPost("upload_file", httpParams, UploadFileBean.class, error);
    //}
}
